/*
 * DRACOON API
 * REST Web Services for DRACOON<br><br>This page provides an overview of all available and documented DRACOON APIs, which are grouped by tags.<br>Each tag provides a collection of APIs that are intended for a specific area of the DRACOON.<br><br><a title='Developer Information' href='https://developer.dracoon.com'>Developer Information</a>&emsp;&emsp;<a title='Get SDKs on GitHub' href='https://github.com/dracoon'>Get SDKs on GitHub</a><br><br><a title='Terms of service' href='https://www.dracoon.com/terms/general-terms-and-conditions/'>Terms of service</a>
 *
 * OpenAPI spec version: 4.45.1
 * 
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */

package ch.cyberduck.core.sds.io.swagger.client.model;

import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.ArrayList;
import java.util.List;
/**
 * Request model for restoring deleted nodes
 */
@Schema(description = "Request model for restoring deleted nodes")

public class RestoreDeletedNodesRequest {
  @JsonProperty("deletedNodeIds")
  private List<Long> deletedNodeIds = new ArrayList<>();

  /**
   * Node conflict resolution strategy:  * &#x60;autorename&#x60;  * &#x60;overwrite&#x60;  * &#x60;fail&#x60;
   */
  public enum ResolutionStrategyEnum {
    AUTORENAME("autorename"),
    OVERWRITE("overwrite"),
    FAIL("fail");

    private String value;

    ResolutionStrategyEnum(String value) {
      this.value = value;
    }
    @JsonValue
    public String getValue() {
      return value;
    }

    @Override
    public String toString() {
      return String.valueOf(value);
    }
    @JsonCreator
    public static ResolutionStrategyEnum fromValue(String input) {
      for (ResolutionStrategyEnum b : ResolutionStrategyEnum.values()) {
        if (b.value.equals(input)) {
          return b;
        }
      }
      return null;
    }

  }  @JsonProperty("resolutionStrategy")
  private ResolutionStrategyEnum resolutionStrategy = ResolutionStrategyEnum.AUTORENAME;

  @JsonProperty("keepShareLinks")
  private Boolean keepShareLinks = false;

  @JsonProperty("parentId")
  private Long parentId = null;

  public RestoreDeletedNodesRequest deletedNodeIds(List<Long> deletedNodeIds) {
    this.deletedNodeIds = deletedNodeIds;
    return this;
  }

  public RestoreDeletedNodesRequest addDeletedNodeIdsItem(Long deletedNodeIdsItem) {
    this.deletedNodeIds.add(deletedNodeIdsItem);
    return this;
  }

   /**
   * List of deleted node IDs
   * @return deletedNodeIds
  **/
  @Schema(required = true, description = "List of deleted node IDs")
  public List<Long> getDeletedNodeIds() {
    return deletedNodeIds;
  }

  public void setDeletedNodeIds(List<Long> deletedNodeIds) {
    this.deletedNodeIds = deletedNodeIds;
  }

  public RestoreDeletedNodesRequest resolutionStrategy(ResolutionStrategyEnum resolutionStrategy) {
    this.resolutionStrategy = resolutionStrategy;
    return this;
  }

   /**
   * Node conflict resolution strategy:  * &#x60;autorename&#x60;  * &#x60;overwrite&#x60;  * &#x60;fail&#x60;
   * @return resolutionStrategy
  **/
  @Schema(description = "Node conflict resolution strategy:  * `autorename`  * `overwrite`  * `fail`")
  public ResolutionStrategyEnum getResolutionStrategy() {
    return resolutionStrategy;
  }

  public void setResolutionStrategy(ResolutionStrategyEnum resolutionStrategy) {
    this.resolutionStrategy = resolutionStrategy;
  }

  public RestoreDeletedNodesRequest keepShareLinks(Boolean keepShareLinks) {
    this.keepShareLinks = keepShareLinks;
    return this;
  }

   /**
   * Preserve Download Share Links and point them to the new node.
   * @return keepShareLinks
  **/
  @Schema(description = "Preserve Download Share Links and point them to the new node.")
  public Boolean isKeepShareLinks() {
    return keepShareLinks;
  }

  public void setKeepShareLinks(Boolean keepShareLinks) {
    this.keepShareLinks = keepShareLinks;
  }

  public RestoreDeletedNodesRequest parentId(Long parentId) {
    this.parentId = parentId;
    return this;
  }

   /**
   * Node parent ID  (default: previous parent ID)
   * @return parentId
  **/
  @Schema(description = "Node parent ID  (default: previous parent ID)")
  public Long getParentId() {
    return parentId;
  }

  public void setParentId(Long parentId) {
    this.parentId = parentId;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    RestoreDeletedNodesRequest restoreDeletedNodesRequest = (RestoreDeletedNodesRequest) o;
    return Objects.equals(this.deletedNodeIds, restoreDeletedNodesRequest.deletedNodeIds) &&
        Objects.equals(this.resolutionStrategy, restoreDeletedNodesRequest.resolutionStrategy) &&
        Objects.equals(this.keepShareLinks, restoreDeletedNodesRequest.keepShareLinks) &&
        Objects.equals(this.parentId, restoreDeletedNodesRequest.parentId);
  }

  @Override
  public int hashCode() {
    return Objects.hash(deletedNodeIds, resolutionStrategy, keepShareLinks, parentId);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class RestoreDeletedNodesRequest {\n");
    
    sb.append("    deletedNodeIds: ").append(toIndentedString(deletedNodeIds)).append("\n");
    sb.append("    resolutionStrategy: ").append(toIndentedString(resolutionStrategy)).append("\n");
    sb.append("    keepShareLinks: ").append(toIndentedString(keepShareLinks)).append("\n");
    sb.append("    parentId: ").append(toIndentedString(parentId)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(java.lang.Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}
